/*
 * Copyright Radosław Smogura, 2012. All rights reserved.
 *
 * The content of this file is confidential and it is intelectual property
 * of copyright owners.
 * 
 *
 * $URL: http://reprap-ide.googlecode.com/svn/trunk/RepRapIDE/RepRapProject/src/main/java/eu/softper/reprap/generator/ArrayVertexZCompartor.java $
 * $Id: ArrayVertexZCompartor.java 3 2012-11-19 10:58:30Z mail@smogura.eu $
 * $Revision: 3 $
 */
package eu.softper.reprap.generator;

import java.util.Comparator;

/**
 *
 * @author Radosław Smogura
 */
public class ArrayVertexZCompartor implements Comparator<float[]> {

    @Override
    public int compare(float[] o1, float[] o2) {
        if (o1[2] < o2[2])
            return -1;
        
        if (o1[2] == o2[2])
            return 0;
        
        return 1;
    }
    
}
